package com.cg.design.graphicdesignpattern.adapter;

/**
 * 对象适配器模式（使用委托的适配器）
 *
 * @program: LeetCode->PrintBanner2
 * @description: 对象适配器模式（使用委托的适配器）
 * @author: cg
 * @create: 2022-03-17 21:31
 **/
public class PrintBanner2 implements Print {

    private Banner banner;

    public PrintBanner2(String name) {
        this.banner = new Banner(name);
    }

    @Override
    public void printWeak() {
        banner.showWithParen();
    }

    @Override
    public void printStrong() {
        banner.showWithAster();
    }
}
